# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=payloadsallthethings
pkgver=2130.ca50df2
pkgrel=1
pkgdesc='A list of useful payloads and bypass for Web Application Security and Pentest/CTF.'
groups=('blackarch' 'blackarch-misc')
arch=('any')
url='https://github.com/swisskyrepo/PayloadsAllTheThings/'
license=('MIT')
makedepends=('git')
source=("$pkgname::git+https://github.com/swisskyrepo/PayloadsAllTheThings.git")
sha512sums=('SKIP')

pkgver() {
	cd $pkgname

	echo "$(git rev-list --count HEAD)"."$(git rev-parse --short HEAD)"
}


package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm *.md LICENSE

	cp -a * "$pkgdir/usr/share/$pkgname"
}

